<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="/publico/template/templatePadrao.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core">

    <ui:define name="content">

        
        <h:form id="listarPlano">

            <p:panel header="Lista de Planos">
                <p:growl showDetail="true" showSummary="true"/>

                <p:commandButton value="Novo" ajax="false" action="#{planoBean.novo()}"/>

                <p:dataTable 
                    id="dtPlano"
                    var="plano" value="#{planoBean.planos}"
                    emptyMessage="Sem registro para a exibição."
                    paginator="true" rows="6"  
                    paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                    rowsPerPageTemplate="5,10,15">

                    <p:column headerText="Título" filterBy="#{plano.titulo}" >  
                        <h:outputText value="#{plano.titulo}" />  
                    </p:column>  

                    
                    <p:column headerText="Data" filterBy="#{plano.data}" >  
                        <h:outputText value="#{plano.data}" />  
                    </p:column>  
                    
                    <p:column headerText="Resumo" filterBy="#{plano.resumo}" >  
                        <h:outputText value="#{plano.resumo}" />  
                    </p:column>  
                    
                    </p:dataTable>
            </p:panel>
        </h:form>
    </ui:define>
</ui:composition>